package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.ReportRecord;
import com.ruoyi.system.mapper.ReportRecordMapper;
import com.ruoyi.system.service.ReportRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ReportRecordServiceImpl implements ReportRecordService {
    @Autowired
    ReportRecordMapper reportRecordMapper;
    @Override
    public List<ReportRecord> selectKeepList(ReportRecord reportRecord) {
       return reportRecordMapper.selectList(reportRecord);
    }

    @Override
    public List<ReportRecord> selectAll(ReportRecord reportRecord) {
        return reportRecordMapper.selectAll(reportRecord);
    }

    @Override
    public List<ReportRecord> selectNeedMe(Long keeperId) {
        return reportRecordMapper.selectNeedMe(keeperId);
    }

    @Override
    public ReportRecord selectById(Long id) {
        return reportRecordMapper.selectById(id);
    }

    @Override
    public Boolean createReportRecord(ReportRecord reportRecord) {
        return reportRecordMapper.insert(reportRecord) == 1;
    }

    @Override
    public Boolean updateReportRecord(ReportRecord reportRecord) {
        return reportRecordMapper.update(reportRecord) == 1;
    }

    @Override
    public Boolean deleteById(Long id) {
        return reportRecordMapper.deleteById(id) == 1;
    }
}
